/* note #undef's at end of file */
#define NRANSI
#include "nrutil.h"

extern int nn2;
extern double *fvec2;
extern void (*nrfuncv2)(int n, double v[], double f[]);

double fminsq2(double x[])
{
	int i;
	double sum;

	(*nrfuncv2)(nn2,x,fvec2);
	for (sum=0.0,i=1;i<=nn2;i++) {
		sum += DSQR(fvec2[i]);
	}
	return 0.5*sum;
}
#undef NRANSI
